package com.drotposta.unitils;

import java.lang.reflect.Field;

/**
 *
 * @author elek
 */
public class ResourceInjector extends BaseInjector{
    private Object inject;
    private Class resourceClazz;
    public ResourceInjector(Object inject,Class resourceClazz) {
        this.inject = inject;
        this.resourceClazz = resourceClazz;
    }

    @Override
    public Object getValueToInject(Object bean, Field field, Class annotation) {
        return inject;
    }

    @Override
    public boolean mustInjected(Object bean, Class fieldClazz) {
        return fieldClazz.equals(resourceClazz);
    }

   
    

    
    
    
}
